At present, the application of relational databases is very broad, for example, a MYSQL database. Nowadays, relational database clusters mostly adopt a one-master-multiple-slave architecture. As shown in FIG. 1, FIG. 1 is a schematic diagram of the architecture of a MYSQL database cluster, which comprises a master database and three slave databases, the three slave databases being:
Slave-1, Slave-2 and Slave-3, respectively.
For example, as shown in FIG. 1, Slave-1 and Slave-2 are located in a computer room 1, and Slave-3 is located in a computer room 2. The master database is connected with the slave databases Slave-1, Slave-2 and Slave-3, respectively.
In actual use of a database, the master database master might run down due to various reasons. At this point, to reduce the influence of the database to the services, it is necessary to select a slave database to act as a new master database to replace the original master database. In the database cluster, it is required that the master database must save the latest data in the current database cluster, and therefore it is necessary to complement the data in the new master database. However, currently, there is no effective technical means capable of conducting data complementing for a new master database at the time of switching a master database of a database cluster.